
# coding:utf-8


# http://www.practicepython.org/
# https://www.kokugobunpou.com/助動詞/助動詞-2-せる-させる/
import os
import datetime
# practice 1
# now =  datetime.datetime.now()
# age = eval(raw_input("input your age:"))
# year_100 = now.year - int(age) + 100
# print "Hello " + str(year_100) + " you will be 100 year"

# practice 2
# num = eval(raw_input("please input a number:"))
# if (num % 2 ) == 1 :
# 	print str(num) + " is Odd"
# elif (num % 2 )== 0:
# 	print str(num) + " is Even"


# import array
#practice 3
# a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
# res = []
# for n in a :
# 	if n < 5: res.append(n)
# # do in one line
# print [elt for elt in a if elt < 5 ]

# practice 4　　divisor
# userinput = eval(raw_input("please input a number"))
# resholder = []
# cntarr = range(1,userinput+1)
# for i,x in cntarr :
# 	print index
# 	if userinput%x == 0: resholder.append(x)
# print resholder


#practice5
# a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
# b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
# c = [ x for x in a if x in b ]
# remove duplicate 
# c = list(set(c))
# print c

#practice 7
# word = "1234"
# #reverse the string
# rword = word[::-1]
# if word == rword : print "it's a palindrome word" 
# print str(rword)

#practice 8
# a = list([1, 4, 9, 16, 25, 36, 49, 64, 81, 100])
# # solution 1
# print [x for x in a if x <= a[6]]
# #solution 2
# resholder = []
# for index in range(0,len(a)):
# 	if index<=6 :
# 		resholder.append(a[index])
# print resholder

# pratice 8  Rock Paper Scissor
def start():
	user1 = raw_input("input Rock, Paper ,Scissor").lower()
	user2 = raw_input("input Rock, Paper ,Scissor").lower()

	if user1 == "rock":
		if user2 == "rock" : return 0
		if user2 == "paper" :return -1
		if user2 == "scissor": return 1

	if user1 == "paper":
		if user2 == "paper" :return 0
		if user2 == "scissor" :return -1
		if user2 == "rock" :return 1

	if user1 == "scissor":
		if user2 == "scissor": return 0
		if user2 == "rock": return -1
		if user2 == "paper": return 1

def logic():
	dict = {-1:"負けた",0:"平和",1:"勝つ"}
	res = start()
	print dict.get(res)

	goon = raw_input("続きますか？Y/N").lower()
	if goon == "n":  logic()

logic()
